<template>
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component"></component>
    </keep-alive>
  </router-view>
</template>

<script lang="ts">
import { ref, defineComponent } from "vue";
export default defineComponent({
  name: "App",
  setup() {
    // 需要缓存的组件name值
    const includeList = ref(["Login"]);
    return {
      includeList,
    };
  },
});
</script>
